package st.business.tepth.business.user.busnumber.finishholder.maintain;

import java.util.List;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.business.tepth.business.bean.MaintainPassInfoBean;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;
import st.shadow.library.ui.recycler.MultipleItemEntity;

/**
 * Author: shadow
 * Email:  1025431817@qq.com
 * Time:   2019-04-11 15:37
 */

public interface FinishMaintainContract {
    interface View extends BaseView {
        void showData(List<MultipleItemEntity> list);

        void showError(String msg);
        void reworkSucceed();
    }

    interface Model extends BaseModel {
        Disposable getData(String token, int repairId,
                           boolean isFinish,
                           OnDataConvertListener<List<MaintainPassInfoBean>> listener);
        Disposable rework(String token, int repairId,
                          String repairTaskIds,
                          String reason,
                          OnDataConvertListener<String> listener);
    }

    abstract class  Presenter extends BasePresenter<View> {
        abstract void getData(String token, int repairId,boolean isFinish);
        abstract void rework(String token, int repairId,
                             String repairTaskIds,String reason);
    }
}
